package com.bilibili.bilibili.network;

import android.content.Context;

import com.android.volley.Request;
import com.android.volley.toolbox.StringRequest;
import com.bilibili.bilibili.application.App;

public class HttpGetData {

    private static StringRequest sStringRequest;

    public static void RequestGet(Context context, String path, String tag, VolleyInterface vif) {
        //防止重复请求
        App.getHttpQueue().cancelAll(tag);
        sStringRequest = new StringRequest(Request.Method.GET, path, vif.loadingListener(), vif.errorListener());
        sStringRequest.setTag(tag);
        App.getHttpQueue().add(sStringRequest);
        App.getHttpQueue().start();
    }

}
